package com.app.Filter;

import com.alibaba.fastjson.serializer.NameFilter;

public class MyPascalNameFilter implements NameFilter {

    public MyPascalNameFilter() {
    }

    @Override
    public String process(Object source, String name, Object value) {

        if (name != null && name.length() != 0) {
            if (name.equals("data") || name.equals("dataKey") || name.equals("facilityCode") || name.equals("handType")) {
                return name;
            } else {
                char[] charArray = name.toCharArray();
                charArray[0] = Character.toUpperCase(charArray[0]);
                String s = new String(charArray);
                return s;
            }
        } else {
            return name;
        }
    }
}
